package com.study.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.study.model.jdao.MenubarJdao;
import com.study.model.mdao.MenubarMdao;
import com.study.model.pojo.Menubar;

@Service
public class MenubarServices {
	@Autowired
	MenubarJdao mbdao;
	@Autowired
	MenubarMdao mmdao;
	
	public List<Menubar> queryByeid(int eid){
		return mbdao.queryByeid(eid);
	};
	public void addMenu(Menubar b){
		b.setMbno(mmdao.findmaxid()+10);
		b.setIcon("el-icon-s-goods");
		b.setPath("/home/buyer");
		mmdao.addMenu(b);
	};
	/**
	 * 根据权限id删除菜单**/
	public void delMenubyrid(int rid){
		mmdao.delMenubyrid(rid);
	};
}
